Skip to content

Embed WOFF2 fonts in SVG export and fix PPT/SVG exporter rendering issues.#3488

Open
OnionsYu wants to merge 17 commits into
Tencent:mainfrom
OnionsYu:feature/onionsyu_font_woff
Open

Embed WOFF2 fonts in SVG export and fix PPT/SVG exporter rendering issues.#3488
OnionsYu wants to merge 17 commits into
Tencent:mainfrom
OnionsYu:feature/onionsyu_font_woff

Conversation

@OnionsYu

@OnionsYu OnionsYu commented Jun 5, 2026

Copy link
Copy Markdown
Contributor

新增 SVGExporter 的 embedFontsAsWoff2 选项,将矢量字体以 WOFF2 形式内嵌到 SVG 中,并把 WOFF2 字体生成器从 pagx/html 抽到 pagx/utils 与 HTML 导出共享。

修复多个导出渲染问题:PPT 导出时 Group isolation 处理导致 Group 外 Painters 错误地把 Group alpha 叠加到向上传播的几何体;连续 TrimPath 现在按 path 在多个 shape 之间分布,使 SVG 的渐变填充范围与原生渲染器一致;SVG、PPT、HTML 三个导出器的 PAGX group skew 符号统一为与原生渲染器一致。

精简 SVG 导出器中重复的样式与矩阵字符串拼接逻辑,统一通过 applyPaintColor 输出 fill 和 stroke 颜色。

补充 SVG path parser、feature probe、modifier resolver 等边界分支以及 embedFontsAsWoff2 选项的单元测试。

@codecov-commenter

codecov-commenter commented Jun 5, 2026

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 88.98226% with 118 lines in your changes missing coverage. Please review.
✅ Project coverage is 80.81%. Comparing base (2eba728) to head (bdc69ee).

Files with missing lines Patch % Lines
src/pagx/svg/SVGExporter.cpp 72.22% 37 Missing and 38 partials ⚠️
src/pagx/utils/ModifierResolver.cpp 84.44% 7 Missing and 7 partials ⚠️
src/pagx/utils/ExporterUtils.cpp 76.66% 3 Missing and 4 partials ⚠️
test/src/PAGXSVGTest.cpp 98.48% 1 Missing and 6 partials ⚠️
src/pagx/utils/Woff2FontGenerator.cpp 53.84% 3 Missing and 3 partials ⚠️
src/pagx/ppt/PPTExporter.cpp 78.26% 3 Missing and 2 partials ⚠️
src/pagx/html/HTMLWriterGroup.cpp 0.00% 2 Missing ⚠️
test/src/PAGXUtilsTest.cpp 98.87% 0 Missing and 2 partials ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main    #3488      +/-   ##
==========================================
+ Coverage   80.57%   80.81%   +0.23%     
==========================================
  Files         620      620              
  Lines       67021    67893     +872     
  Branches    19885    19998     +113     
==========================================
+ Hits        54005    54867     +862     
+ Misses       9079     9043      -36     
- Partials     3937     3983      +46     

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

OnionsYu added 4 commits June 8, 2026 14:11
…Use gradients and patterns resolve in parent space.
…orm so masks resolve in the owner's parent space like the PAGX renderer.
Comment thread src/pagx/ppt/PPTExporter.cpp Outdated
Comment thread src/pagx/svg/SVGExporter.cpp Outdated
Comment thread src/pagx/svg/SVGExporter.cpp Outdated
Comment thread src/pagx/svg/SVGExporter.cpp
Comment thread src/pagx/svg/SVGExporter.cpp
Comment thread src/pagx/svg/SVGExporter.cpp
Comment thread src/pagx/svg/SVGExporter.cpp Outdated
Comment thread src/pagx/svg/SVGExporter.cpp Outdated
Comment thread src/pagx/svg/SVGExporter.cpp Outdated
Comment thread test/src/PAGXSVGTest.cpp
Comment thread test/src/PAGXUtilsTest.cpp
Comment thread test/src/PAGXSVGTest.cpp
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants